Crate lodestone_core[−][src]
Expand description
lodestone_core
Lodestone_core is a library to calculate the magnetic fields of arbitrary polygons and polyheda in 2D and 3D.
//! This test library and binary implements routines for calculating magnetic fields, written in Rust. A more complete Python version can be found on Github, or PyPi
User friendly magnetic field calculations
This library consists of methods for calculating magnetic fields due to simple objects in 2D and 3D.
Calculation Method
Exact Analytical Methods
Iterative Method for Cylindrical Sources
Modules
The magnets module contains the 2D magnet objects and their methods for calculating magnetic fields
Routines for reading simulation input files, writing result files, and command line argument configuration
Generic traits for all point objects i.e. Points (2D, 3D, cartesian, polar, cylindrical, spherical), structs of heap allocated vectors, stack allocated arrays
The utils module contains utilities to generate points structs, convert between different coordinates, and quaternion routines for rotation
Enums
Error Enum for possible errors
Constants
Floating point cutoff for relative error 1e-12
Floating point cutoff for vector alignment 1e-6
1/(2*PI)
1/(2*PI)
2*PI
4*PI
Not a number - float64 variant
PI
PI/2
PI/3
PI/4
PI/6
Maximum number of elements allowed in an array inside a PointArray struct. 10,000.